{% extends 'HWIOAuthBundle::layout.html.twig' %}

{% block titre %}
    {{ 'header.connecting' | trans({}, 'HWIOAuthBundle')}}
{% endblock %}
    
{% block title %}
    {{ block('titre') }}    
{% endblock %}

{% block hwi_oauth_content %}
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            {% if userInformation.profilePicture is defined and userInformation.profilePicture is not empty %}
                <img class="img img-responsive" src="{{ userInformation.profilePicture }}" />
            {% endif %}
        </div>
    </div>
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <p>{{ 'connect.confirm.text' | trans({'%service%': service|capitalize | trans({}, 'HWIOAuthBundle'), '%name%': userInformation.realName}, 'HWIOAuthBundle') }}</p>
            <p>
                <form action="{{ path('hwi_oauth_connect_service', {'service': service, 'key': key}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
                    {{ form_widget(form) }}
                    <div>
                        <button type="submit" class="btn btn-primary">{{ 'connect.confirm.submit' | trans({}, 'HWIOAuthBundle') }}</button>
                        <a href="{{ path('hwi_oauth_connect') }}" class="btn btn-default">{{ 'connect.confirm.cancel' | trans({}, 'HWIOAuthBundle') }}</a>
                    </div>
                </form>
            </p>
        </div>
    </div>
{% endblock hwi_oauth_content %}
